package ink.onei.shopping.mapper;

import java.util.List;
import ink.onei.shopping.domain.Order;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 * 
 * @author nekotako
 * @date 2024-02-24
 */
public interface OrderMapper  {
    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    public Order selectOrderByOrderId(Long orderId);

    /**
     * 查询订单列表
     * 
     * @param order 订单
     * @return 订单集合
     */
    public List<Order> selectOrderList(Order order);

    /**
     * 新增订单
     * 
     * @param order 订单
     * @return 结果
     */
    public int insertOrder(Order order);

    /**
     * 修改订单
     * 
     * @param order 订单
     * @return 结果
     */
    public int updateOrder(Order order);

    /**
     * 删除订单
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteOrderByOrderId(Long orderId);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOrderByOrderIds(Long[] orderIds);

    Order selectOrderByTradeNo(@Param("alipayTradeNo") String alipayTradeNo);
}
